package com.eqdd.yiqidian.ui.companyspace

import com.eqdd.yiqidian.bean.rebuild.slimedit.SlimEditEnterBean
import com.eqdd.yiqidian.bean.rebuild.slimedit.SlimImageSelectBean
import com.eqdd.yiqidian.http.HttpConfig
import com.eqdd.yiqidian.ui.companyspace.base.BaseSpaceAddActivity
import com.lzy.okgo.model.HttpParams
import java.io.File


/**
 * Created by jhj on 18-6-25.
 */
class CoreValueAddActivity : BaseSpaceAddActivity() {

    override val title: String
        get() = "核心价值观"
    override val url: String
        get() = HttpConfig.BASE_URL + HttpConfig.CORE_VALUE_ADD

    override fun uploadParams(): HttpParams {
        val params = HttpParams()
        val bean = slimAdapterEx.data
        params.put("title", bean[1].content)
        params.put("describe", bean[2].content)
        bean[0].tag?.let {
            params.put("image", File(bean[0].tag as? String))
        }
        return params
    }

    override fun setEditBeans() {
        datas.add(SlimImageSelectBean("图      片", 0, "").setDeal(true).setNeed(true))
        datas.add(SlimEditEnterBean("图片标题", "", 1, "请输入").setNeed(true))
        datas.add(SlimEditEnterBean("图片描述", "", 2, "请输入").setNeed(true))
    }

}